package com.tianhui.consignortwofei.mvp.ui.activity.carrier;

import com.tianhui.consignortwofei.R;
import com.tianhui.consignortwofei.mvp.model.enty.CarrierInfo;

/**
 * @author fgs
 * @date 2021/5/22
 * @description
 **/
public class EditCarrierActivity extends AddCarrierActivity {


    @Override
    public void init() {
        super.init();
        setTitle("编辑承运商");
    }

    @Override
    public void showCarrierInfo(CarrierInfo carrierInfo) {
        super.showCarrierInfo(carrierInfo);
        carrierTypeClickItemView.setItemClickable(false);
        carrierTypeClickItemView.setContentTextColor(getResources().getColor(R.color.colorTextGray));
        carrierNameInputItemView.setItemEnable(false);
        carrierPhoneInputItemView.setItemEnable(false);

        if (carrierInfo.carriertype.equals("0")) {
            carrierTypeClickItemView.setContent("自营车");
        } else if (carrierInfo.carriertype.equals("1")) {
            carrierTypeClickItemView.setContent("外协车");
        } else if (carrierInfo.carriertype.equals("2")) {
            carrierTypeClickItemView.setContent("其他");
        }
        contractsInputItemView.setContent(carrierInfo.carrieruername);
        carrierPhoneInputItemView.setContent(carrierInfo.carriertel);

    }
}
